$OpenBSD: patch-scripts_util_ssvnc_tcl,v 1.6 2011/09/15 20:24:16 sthen Exp $

type sometimes returns "xx is a tracked alias for /foo/bar" which
isn't handled. whence is sufficient and more reliable.

--- scripts/util/ssvnc.tcl.orig	Wed Jan 12 01:20:29 2011
+++ scripts/util/ssvnc.tcl	Thu Sep 15 14:44:01 2011
@@ -18236,7 +18236,7 @@ proc check_zeroconf_browse {} {
 		return 0;
 	}
 	set p ""
-	set r [catch {set p [exec /bin/sh -c {type avahi-browse}]}]
+	set r [catch {set p [exec /bin/sh -c {whence avahi-browse}]}]
 	if {$r == 0} {
 		regsub {^.* is  *} $p "" p
 		regsub -all {[ \t\n\r]} $p "" p
@@ -18246,7 +18246,7 @@ proc check_zeroconf_browse {} {
 		}
 	}
 	set p ""
-	set r [catch {set p [exec /bin/sh -c {type dns-sd}]}]
+	set r [catch {set p [exec /bin/sh -c {whence dns-sd}]}]
 	if {$r == 0} {
 		regsub {^.* is  *} $p "" p
 		regsub -all {[ \t\n\r]} $p "" p
@@ -18261,7 +18261,7 @@ proc check_zeroconf_browse {} {
 		}
 	}
 	set p ""
-	set r [catch {set p [exec /bin/sh -c {type mDNS}]}]
+	set r [catch {set p [exec /bin/sh -c {whence mDNS}]}]
 	if {$r == 0} {
 		regsub {^.* is  *} $p "" p
 		regsub -all {[ \t\n\r]} $p "" p
